﻿using System;
using System.Collections.Generic;

using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.Profile;
using System.Data;
using System.Web.Security;

namespace WebSite.cn
{
    public partial class userinfo : BasePage
    {
        // Fields
        public string membermsg = "";
        // Methods
        private void Bind()
        {
            DataTable table = SQLAccess.GreatDs("select * from DB_Member where memberid=" + base.LoginUserMember.MemberId + "").Tables[0];
            if (table.Rows.Count > 0)
            {
                string sSex = "";
                if (table.Rows[0]["sex"].ToString() == "0")
                {
                    sSex = "男";
                }
                else if (table.Rows[0]["sex"].ToString() == "1")
                {
                    sSex = "女";
                }
                else
                {
                    sSex = "";
                }
                this.membermsg = this.membermsg + "<tr><td width='25%' height='28' align='right' bgcolor='#FFFFFF'>登录用户名：</td>";
                this.membermsg = this.membermsg + "<td align='left' bgcolor='#FFFFFF'> 　" + table.Rows[0]["memberlogin"].ToString() + "</td></tr>";
                this.membermsg = this.membermsg + "<tr><td width='25%' height='28' align='right' bgcolor='#FFFFFF'>收件人姓名：</td>";
                this.membermsg = this.membermsg + "<td align='left' bgcolor='#FFFFFF'> 　" + table.Rows[0]["membername"].ToString() + "</td></tr>";
               // this.membermsg = this.membermsg + "<tr><td width='25%' height='28' align='right' bgcolor='#FFFFFF'>性别：</td>";
               // this.membermsg = this.membermsg + "<td align='left' bgcolor='#FFFFFF'> 　" + sSex + "</td></tr>";
                this.membermsg = this.membermsg + "<tr><td width='25%' height='28' align='right' bgcolor='#FFFFFF'>手机：</td>";
                this.membermsg = this.membermsg + "<td align='left' bgcolor='#FFFFFF'> 　" + table.Rows[0]["phone"].ToString() + "</td></tr>";
                this.membermsg = this.membermsg + "<tr><td width='25%' height='28' align='right' bgcolor='#FFFFFF'>联系电话：</td>";
                this.membermsg = this.membermsg + "<td align='left' bgcolor='#FFFFFF'> 　" + table.Rows[0]["tel1"].ToString() + "</td></tr>";
               // this.membermsg = this.membermsg + "<tr><td width='25%' height='28' align='right' bgcolor='#FFFFFF'>邮政编码：</td>";
               // this.membermsg = this.membermsg + "<td align='left' bgcolor='#FFFFFF'> 　" + table.Rows[0]["post"].ToString() + "</td></tr>";
                this.membermsg = this.membermsg + "<tr><td width='25%' height='28' align='right' bgcolor='#FFFFFF'>联系地址：</td>";
                this.membermsg = this.membermsg + "<td align='left' bgcolor='#FFFFFF'> 　" + table.Rows[0]["address"].ToString() + "</td></tr>";
               // this.membermsg = this.membermsg + "<tr><td width='25%' height='28' align='right' bgcolor='#FFFFFF'>QQ：</td>";
               // this.membermsg = this.membermsg + "<td align='left' bgcolor='#FFFFFF'> 　" + table.Rows[0]["qq"].ToString() + "</td></tr>";
              //  this.membermsg = this.membermsg + "<tr><td width='25%' height='28' align='right' bgcolor='#FFFFFF'>MSN：</td>";
               // this.membermsg = this.membermsg + "<td align='left' bgcolor='#FFFFFF'> 　" + table.Rows[0]["msn"].ToString() + "</td></tr>";
                this.membermsg = this.membermsg + "<tr><td width='25%' height='28' align='right' bgcolor='#FFFFFF'>E-Mail：</td>";
                this.membermsg = this.membermsg + "<td align='left' bgcolor='#FFFFFF'> 　" + table.Rows[0]["email"].ToString() + "</td></tr>";
               // this.membermsg = this.membermsg + "<tr><td width='25%' height='28' align='right' bgcolor='#FFFFFF'>级别：</td>";
               // this.membermsg = this.membermsg + "<td align='left' bgcolor='#FFFFFF'> 　" + table.Rows[0]["rankid"].ToString() + "</td></tr>";
                //this.membermsg = this.membermsg + "<tr><td width='25%' height='28' align='right' bgcolor='#FFFFFF'>积分：</td>";
                //this.membermsg = this.membermsg + "<td align='left' bgcolor='#FFFFFF'> 　" + table.Rows[0]["score1"].ToString() + "</td></tr>";
                //this.membermsg = this.membermsg + "<tr><td width='25%' height='28' align='right' bgcolor='#FFFFFF'>总购物额：</td>";
                //this.membermsg = this.membermsg + "<td align='left' bgcolor='#FFFFFF'> 　" + table.Rows[0]["xinprice"].ToString() + "</td></tr>";
                //this.membermsg = this.membermsg + "<tr><td width='25%' height='28' align='right' bgcolor='#FFFFFF'>总使用积分：</td>";
                //this.membermsg = this.membermsg + "<td align='left' bgcolor='#FFFFFF'> 　" + table.Rows[0]["memberlogin"].ToString() + "</td></tr>";
                //this.membermsg = this.membermsg + "<tr><td width='25%' height='28' align='right' bgcolor='#FFFFFF'>总支付积分：</td>";
                //this.membermsg = this.membermsg + "<td align='left' bgcolor='#FFFFFF'> 　" + table.Rows[0]["memberlogin"].ToString() + "</td></tr>";
            }
        }

        protected void Page_Load(object sender, EventArgs e)
        {
            if (!base.IsPostBack)
            {
                if (base.LoginUserMember != null)
                {
                    this.Bind();
                }
                else
                {
                    base.Response.Write("<script language=javascript>window.location.href='login.aspx';</script>");
                    base.Response.End();
                }
            }
        }

       

    }
}